package com.oo.fileexplorer.tools;

import java.util.ArrayList;

/**
 * Created by zhuxiaolong on 2017/12/23.
 */

public final class FileResultStarck {


    private ArrayList<ArrayList<FileScanner.FilePype>> starck;


    public void addTop(ArrayList<FileScanner.FilePype> value) {
        if (starck == null) {
            starck = new ArrayList<>();
        }
        starck.add(value);
    }

    public ArrayList<FileScanner.FilePype> pushTop() {
        if (starck == null) {
            starck = new ArrayList<>();
        }

        if (starck.size() > 0) {
            ArrayList result = starck.get(starck.size() - 1);
            starck.remove(result);
            return result;
        } else {
            return null;
        }
    }


}
